package org.itboys.store.entity;

import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.mongodb.morphia.annotations.Entity;

/**
 * Created by huml on 2016/5/16.
 * 产品仓库
 */
@Entity(value = "StoreProductStorage", noClassnameStored = true)
public class ProductStorage extends BaseLongIdEntity {

    private static final long serialVersionUID = -34723543676787L;

    private String name;//海沧仓库名称
    private String viewName;//我们自己显示的仓库名称s
    private boolean isDirectMail = false;//是否海外直邮

    private Integer isDeleted = 0;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        ProductStorage productStorage = (ProductStorage)obj;
        return this.name.equals(productStorage.getName());
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this.name);
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public boolean isDirectMail() {
        return isDirectMail;
    }

    public void setDirectMail(boolean directMail) {
        isDirectMail = directMail;
    }

    public String getViewName() {
        return viewName;
    }

    public void setViewName(String viewName) {
        this.viewName = viewName;
    }
}
